﻿<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="Document" nillable="true" type="Document" />
  <xs:complexType name="Document">
    <xs:sequence>
      <xs:element minOccurs="1" maxOccurs="1" name="Algorithm" type="SymmetricAlgorithm" />
      <xs:element minOccurs="1" maxOccurs="1" name="HashAlgorithm" type="HashAlgorithm" />
      <xs:element minOccurs="0" maxOccurs="1" name="Payload" type="xs:base64Binary" />
      <xs:element minOccurs="0" maxOccurs="1" name="Signature" type="xs:base64Binary" />
      <xs:element minOccurs="0" maxOccurs="1" name="Key" type="xs:base64Binary" />
      <xs:element minOccurs="0" maxOccurs="1" name="IV" type="xs:base64Binary" />
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="SymmetricAlgorithm">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="AES" />
      <xs:enumeration value="TripleDES" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="HashAlgorithm">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="MD5" />
      <xs:enumeration value="SHA256" />
    </xs:restriction>
  </xs:simpleType>
</xs:schema>